<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<link href="css/global.css" type="text/css" rel="stylesheet" />
		<script language="javascript" src="js/jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" language="javascript"></script>
		<script type="text/javascript">
		$(document).ready(function(){
			 $(function () {
	            $("#tb tr").mouseover(function () {
	                $(this).addClass("over");
	            });
	            $("#tb tr").mouseout(function () {
	                $(this).removeClass("over");
	            });
	            $("#tb tr:even").addClass("double");
	        }); 
		});
		function raskquerymessage(batchid){
			parent.art.dialog.open('raskquery_list_detil.do?batchid='+batchid,
    		{title: '数据', width: 620, height: 400});
		}
		</script>
	</head>
	
	<body>
		<div class="div1">
			<div class="position">
				<div style="float: left;">
					<img src="images/dangqian25.gif" style="float: left;" />
					<span style="padding-left: 2px;">短信查询</span>
				</div>
				<div style="float: right; padding-right: 3px; padding-top: 1px;">
					<!--<input
						style="background: url(images/xinzeng.gif) no-repeat; margin-right: 3px;"
						id="btnAdd" type="button" value="条件搜索" class="button"
						onclick="addShowDialog()" />
				 	<input style="background: url(images/shan.gif) no-repeat;"
						id="btnDelete" type="button" value="删除" class="button"
						onclick="batchDelete()" />
  					-->
				</div>
			</div>
			<div id="search" style="margin-top: 2px;">
				<table class="btable" >
					<tr>
						<td width="10%">开始时间</td>
						<td>
							 <input id="startDay_search" type="text" value=""
												readonly="readonly"
												onclick="WdatePicker({dateFmt:'yyyyMMdd',el:'startDay_search',skin:'default',isShowClear:false,isShowToday:false});" />
						</td>
						<td width="10%">结束时间</td>
						<td>
							 <input id="endDay_search" type="text" value=""
												readonly="readonly"
												onclick="WdatePicker({dateFmt:'yyyyMMdd',el:'endDay_search',skin:'default',isShowClear:false,isShowToday:false});" />
						</td>
						<td width="10%">发送类型</td>
						<td class="lf">
							<select style="width: 100px;">
								<option >即时发送</option>
								<option >定时发送</option>
							</select>
						</td>
						<td width="10%">提交状态</td>
						<td class="lf">
							<select style="width: 100px;">
								<option >成功</option>
								<option >失败</option>
							</select>
						</td>
						<td width="30%">&nbsp;</td>
					</tr>
					<tr>
						<td width="10%">批次号码</td>
						<td class="lf">
							<input id="batchid" type="text" value="" />
						</td>
						<td>
							<input id="Button" type='button' value='查 找' class="button52" />
						</td>
						<td colspan="6" class="lf">
							 <input id="Button" type='button' value='清  除' class="button52" />
						</td>
					</tr>
				</table>
			</div>
			<div class="div2">
				<table id="tb" width="100%" border="0" cellpadding="0" cellspacing="0">
 					<tr>
						<th>
							序号
						</th>
						<th>
							批次号码
						</th>
						<th>
							子号码
						</th>
						<th>
							通道
						</th>
						<th>
							发送号码
						</th>
						<th>
							接收号码
						</th>
						<th>
							发送内容
						</th>
						<th>
							提交状态
						</th>
						<th>
							错误状态
						</th>
						<th>
							消息状态
						</th>
						<th>
							消息指令
						</th>
						<th>
							创建时间
						</th>
					</tr>
					<c:if test="${fn:length(pageDataLists.records)==0}">
					<tr>
						<td colspan="15">
							---无记录---
						</td>
					</tr>
					</c:if>
					<c:forEach items="${pageDataLists.records}" var="item" varStatus="status">
					<!-- <tr style='cursor:hand;'> -->
					<tr>
						<td>${status.count }</td>
						<td>${item.batchid}</td>
						<td>${item.batchsubid}</td>
						<td><p:viewChannel channelid="${item.channelid }" col="2"/></td>
						<td><p:viewChannel channelid="${item.channelid }" col="8"/></td>
						<td>${item.mobile}</td>
						<td>${item.message}</td>
						<td>
							<c:choose>
								<c:when test="${item.status==1 }">成功</c:when>
								<c:when test="${item.status==2 }">失败</c:when>
								<c:otherwise>未知</c:otherwise>
							</c:choose>
						</td>
						<td>${item.error}</td>
						<td>${item.msgcode}</td>
						<td>${item.msgstate}</td>
						<td>
							<fmt:formatDate value="${item.createtime }"  type="date" pattern="yyyy-MM-dd HH:mm"/>
						</td>
					</tr>
					</c:forEach>
					<tr>
						<th style="text-align: right;" colspan="15">
							<p:pageSplit pageNo="${pageDataLists.pageNo}" url="raskqueryhistoryday_list.do" count="${pageDataLists.totalRecords}" pageSize="${pageDataLists.pageSize}" />
						</th>
					</tr>
				</table>
			</div>
		</div>
	</body>
</html>
